<div id="shopping_cart" class="full_page">
        <h1>Shopping Cart</h1>
        <div class="message success">Nokia Lumia 800 - LX was added to your shopping cart.</div>
        <div class="action_buttonbar">
        
          <button title="" onclick="window.parent.location.href='<?php echo base_url();?>'" class="continue">Continue Shopping</button>
          
          
          <button type="button" onclick="parent.location='leisure_checkout.html'" title="" class="checkout">Checkout</button>
          
        </div>
        <div class="cart_table">
          <table class="data-table cart-table" id="shopping-cart-table" cellpadding="0" cellspacing="0">
            <tbody>
            <tr>
              <th colspan="2">Ürünler</th>
              <th class="align_center" width="6%"></th>
              <th class="align_center" width="12%">Birim Fiyatı</th>
              <th class="align_center" width="10%">Adet</th>
              <th class="align_center" width="12%">Toplam</th>
              <th class="align_center" width="6%"></th>
            </tr>
             <?php if(isset($this->session->userdata['products'])): ?>
              <?php /* echo "<pre>";
                  var_dump($this->session->userdata);
                  echo "</pre>"; */
                  ?>
                 
          <?php foreach($this->session->userdata['products'] as $pro): ?>
         
                <?php $cart_id = $this->session->userdata['cart_id'];
                       $cart_info = $this->db->where(array('cart_id' => $cart_id, 'product_id' => $pro['product_id']))->get('cart_products')->row(0);
                       $seller_id = $cart_info->seller_id;
                     
                       $seller_info  = $this->db->where('product_id',$pro['product_id'])->get('products')->row(0);
                       $stock = $seller_info->stock;
                        ?>                      
            <tr>
              <td width="10%"><img src="<?php echo $pro['image'];?>"></td>
              <td class="align_left" width="44%"><a class="pr_name" href="#"><?php echo $pro['model'];?> - <?php echo $pro['name']."(".$this->db->where('size_id',$pro['size_id'])->get('size')->row(0)->size_name.")";?></a><span class="pr_info">Proin gravida </span></td>
              <td class="align_center"></td>
              <td class="align_center vline"><span class="price"><?php echo  number_format($pro['price'], 0, '', '.'); ?> TL</span></td>
              <td class="align_center vline">  <?php echo form_open('cart/update_cart'); ?>   <select id="mySelect" name="adet" onchange="this.form.submit()" >
              
                       <?php 
                 
                       for($i = 1; $i <= $stock; $i++): ?>
                        <option value="<?php echo $i;?>" <?php if( $pro['quantitiy'] == $i) echo "selected=''";?>><?php echo $i;?>    </option>
                        <?php endfor; ?>
                        </select></td>
                                    <input type="hidden" name="product_id"  value="<?php echo $pro['product_id']; ?>"/>
                
                        </form>
             
              <td class="align_center vline"><span class="price"> <?php echo  number_format($pro['ptotal'], 0, '', '.'); ?> TL</span></td>
              <td class="align_center vline"><a href="<?php echo base_url().'cart/remove_product/'.$this->session->userdata['cart_id'].'/'.$pro['product_id'];?>" class="remove"></a></td>
            </tr>
            <?php endforeach; ?>
            <?php endif; ?>                        
            
          </tbody></table>
          <div class="totals">
            <table id="totals-table">
                <tbody><tr>
                  <td width="60%" colspan="1" class="align_left"><strong>Subtotal</strong></td>
                  <td class="align_right" style=""><strong><span class="price">$109.00</span></strong></td>
                </tr>
                <tr>
                  <td width="60%" colspan="1" class="align_left">Shipping cost</td>
                  <td class="align_right" style=""><span class="price">$0.00</span></td>
                </tr>
                <tr>
                  <td width="60%" colspan="1" class="align_left total">Toplam</td>
                  <td class="align_right" style=""><span class="total"><?php echo  number_format($this->session->userdata['total'], 0, '', '.');?> TL</span></td>
                </tr>                
            </tbody></table>
          </div>
        </div>
        <div class="action_buttonbar">
          <button type="button" title="" class="continue">Continue Shopping</button>
          <button type="button" onclick="parent.location='leisure_checkout.html'" title="" class="checkout">Checkout</button>
        </div>
      </div>